home *** CD-ROM | disk | FTP | other *** search
- // Dynamic link library implementation of NeuroSolutions Function component for Triangle setting
-
- #include "NSDLL.h"
-
- /***************************/
- /* Activation of component */
- __declspec(dllexport) NSFloat performFunction(
- DLLData *instance, // Pointer to instance data (may be NULL)
- NSFloat x // Current argument in radians
- )
- {
- return (NSFloat)(x<PI? x/PI: (-x + 2*PI)/PI);
- }
-
- /******************************************/
- /* Management of instance data (OPTIONAL) */
- /*
- __declspec(dllexport) DLLData *allocFunction(
- DLLData *oldInstance // Pointer to the last instance if reallocating
- )
- {
- DLLData *instance = NULL;
- return instance;
- }
-
- __declspec(dllexport) void freeFunction(DLLData *instance)
- {
- freeDLLInstance(instance);
- }
- */